package com.miao.util.developMode.observerMode;

import org.apache.commons.lang3.StringUtils;

import java.util.Observable;

/**
 * Created by miao on 2015/4/13.
 * 被观察者
 */
public class Watched extends Observable {

    private String data = "";

    public String getData() {
        return data;
    }

    public void setData(String data) {
        if (!StringUtils.equalsIgnoreCase(this.data, data)) {
            this.data = data;
            setChanged();
        }
        notifyObservers();
    }
}
